#!/bin/bash

# 安装依赖
npm install

# 创建.env文件
echo "VITE_API_BASE_URL=/api" > .env

# 创建.env.development文件
echo "VITE_API_BASE_URL=/api" > .env.development

# 创建.env.production文件
echo "VITE_API_BASE_URL=/api" > .env.production

# 创建.gitignore文件
cat > .gitignore << EOL
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
.env.local
.env.*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
EOL

echo "项目初始化完成！"
echo "请运行 'npm run dev' 启动开发服务器。" 